package com.solution.admin.customer.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.customer.dao.DeliverFreeAreaDao;
import com.solution.admin.customer.entity.DeliverFreeAreaEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 客户免运费区域DAO实现
 * @author solin
 * @date 2017-09-22 11:56:47
 */
@Repository
public class DeliverFreeAreaDaoImpl extends BaseDaoImpl<DeliverFreeAreaEntity> implements DeliverFreeAreaDao {

	/**
	 * 保存客户免运费区域信息
	 * @param deliverFreeAreaEntity
	 * @return
	 * @author solin
	 * @date 2017-09-22 11:56:47
	 */
	@Override
	public long saveDeliverFreeArea(DeliverFreeAreaEntity deliverFreeAreaEntity) {
		return super.insert(deliverFreeAreaEntity);
	}

	/**
	 * 分页查询客户免运费区域信息
	 * @param pageParam 分页对象
	 * @param deliverFreeArea 分页参数
	 * @return PageBean 分页参数及数据
	 * @author solin
	 * @date 2017-09-22 11:56:47
	 */
	public PageBean listDeliverFreeAreaPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新客户免运费区域
	 * @param deliverFreeAreaEntity
	 * @return
	 * @author solin
	 * @date 2017-09-22 11:56:47
	 */
	@Override
	public int updateDeliverFreeArea(DeliverFreeAreaEntity deliverFreeAreaEntity) {
		return super.update(deliverFreeAreaEntity);
	}

	/**
	 * 删除客户免运费区域
	 * @param deliverFreeAreaId
	 * @return
	 * @author solin
	 * @date 2017-09-22 11:56:47
	 */
	public int deleteDeliverFreeAreaById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询客户免运费区域
	 * @param param
	 * @return
	 * @author solin
	 * @date 2017-09-22 11:56:47
	 */
	@Override
	public List<DeliverFreeAreaEntity> listDeliverFreeArea( Map<String, Object> param) {
		return super.listBy(param);
	}
}
